#pragma once

namespace Render
{
	struct Colour
	{
		Colour() {}

		Colour(float r_, float g_, float b_, float a_) : r(r_), g(g_), b(b_), a(a_) {}

		Colour(uint32 rgba)
		{
			a = (rgba & 0xff) / 255.f;
			r = (rgba >> 24) * a / 255.f;
			g = ((rgba >> 16) & 0xff) * a / 255.f;
			b = ((rgba >> 8) & 0xff) * a / 255.f;
		}

		float r, g, b, a;
	};

	inline Colour ColourRGBA(float r, float g, float b, float a)
	{
		return Colour(r * a, g * a, b * a, a);
	}

	inline Colour ColourRGB(float r, float g, float b)
	{
		return Colour(r, g, b, 1.f);
	}

	inline Colour ColourRGB_Add(float r, float g, float b)
	{
		return Colour(r, g, b, 0.f);
	}
}